(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

half(0) → 0
half(s(s(x))) → s(half(x))
log(s(0)) → 0
log(s(s(x))) → s(log(s(half(x))))

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

half(0) → 0
half(s(s(z0))) → s(half(z0))
log(s(0)) → 0
log(s(s(z0))) → s(log(s(half(z0))))
Tuples:

HALF(0) → c
HALF(s(s(z0))) → c1(HALF(z0))
LOG(s(0)) → c2
LOG(s(s(z0))) → c3(LOG(s(half(z0))), HALF(z0))
S tuples:

HALF(0) → c
HALF(s(s(z0))) → c1(HALF(z0))
LOG(s(0)) → c2
LOG(s(s(z0))) → c3(LOG(s(half(z0))), HALF(z0))
K tuples:none
Defined Rule Symbols:

half, log

Defined Pair Symbols:

HALF, LOG

Compound Symbols:

c, c1, c2, c3

(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 2 trailing nodes:

HALF(0) → c
LOG(s(0)) → c2

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

half(0) → 0
half(s(s(z0))) → s(half(z0))
log(s(0)) → 0
log(s(s(z0))) → s(log(s(half(z0))))
Tuples:

HALF(s(s(z0))) → c1(HALF(z0))
LOG(s(s(z0))) → c3(LOG(s(half(z0))), HALF(z0))
S tuples:

HALF(s(s(z0))) → c1(HALF(z0))
LOG(s(s(z0))) → c3(LOG(s(half(z0))), HALF(z0))
K tuples:none
Defined Rule Symbols:

half, log

Defined Pair Symbols:

HALF, LOG

Compound Symbols:

c1, c3

(5) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

log(s(0)) → 0
log(s(s(z0))) → s(log(s(half(z0))))

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

half(0) → 0
half(s(s(z0))) → s(half(z0))
Tuples:

HALF(s(s(z0))) → c1(HALF(z0))
LOG(s(s(z0))) → c3(LOG(s(half(z0))), HALF(z0))
S tuples:

HALF(s(s(z0))) → c1(HALF(z0))
LOG(s(s(z0))) → c3(LOG(s(half(z0))), HALF(z0))
K tuples:none
Defined Rule Symbols:

half

Defined Pair Symbols:

HALF, LOG

Compound Symbols:

c1, c3

(7) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

LOG(s(s(z0))) → c3(LOG(s(half(z0))), HALF(z0))
We considered the (Usable) Rules:

half(s(s(z0))) → s(half(z0))
half(0) → 0
And the Tuples:

HALF(s(s(z0))) → c1(HALF(z0))
LOG(s(s(z0))) → c3(LOG(s(half(z0))), HALF(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(HALF(x1)) = 0   
POL(LOG(x1)) = x1   
POL(c1(x1)) = x1   
POL(c3(x1, x2)) = x1 + x2   
POL(half(x1)) = x1   
POL(s(x1)) = [1] + x1   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

half(0) → 0
half(s(s(z0))) → s(half(z0))
Tuples:

HALF(s(s(z0))) → c1(HALF(z0))
LOG(s(s(z0))) → c3(LOG(s(half(z0))), HALF(z0))
S tuples:

HALF(s(s(z0))) → c1(HALF(z0))
K tuples:

LOG(s(s(z0))) → c3(LOG(s(half(z0))), HALF(z0))
Defined Rule Symbols:

half

Defined Pair Symbols:

HALF, LOG

Compound Symbols:

c1, c3

(9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

HALF(s(s(z0))) → c1(HALF(z0))
We considered the (Usable) Rules:

half(s(s(z0))) → s(half(z0))
half(0) → 0
And the Tuples:

HALF(s(s(z0))) → c1(HALF(z0))
LOG(s(s(z0))) → c3(LOG(s(half(z0))), HALF(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(HALF(x1)) = [2]x1   
POL(LOG(x1)) = x12   
POL(c1(x1)) = x1   
POL(c3(x1, x2)) = x1 + x2   
POL(half(x1)) = x1   
POL(s(x1)) = [2] + x1   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

half(0) → 0
half(s(s(z0))) → s(half(z0))
Tuples:

HALF(s(s(z0))) → c1(HALF(z0))
LOG(s(s(z0))) → c3(LOG(s(half(z0))), HALF(z0))
S tuples:none
K tuples:

LOG(s(s(z0))) → c3(LOG(s(half(z0))), HALF(z0))
HALF(s(s(z0))) → c1(HALF(z0))
Defined Rule Symbols:

half

Defined Pair Symbols:

HALF, LOG

Compound Symbols:

c1, c3

(11) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(12) BOUNDS(1, 1)